//---------------------------------------------------------------------------

#ifndef t_ganttformH
#define t_ganttformH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.Dialogs.hpp>
#include <Vcl.ExtCtrls.hpp>
//---------------------------------------------------------------------------
class HScrollingWinControl;
class TGanttForm : public TForm
{
__published:	// IDE-managed Components
   TPanel *Panel1;
   TLabel *Label1;
   TLabel *Label2;
   TLabel *Label3;
   TLabel *Label4;
   TEdit *EditStartTime;
   TEdit *EditEndTime;
   TButton *ButtonDrawGanttChart;
   TButton *ButtonSaveGanttChart;
   TCheckBox *CheckBoxPartitionedJobOnly;
   TEdit *EditTime;
   TComboBox *ComboBoxScale;
   TCheckBox *CheckBoxCritical;
   TSaveDialog *SaveDialog1;
   void __fastcall ButtonDrawGanttChartClick(TObject *Sender);
   void __fastcall ButtonSaveGanttChartClick(TObject *Sender);
private:	// User declarations
   HScrollingWinControl *ScrollingWinControl1;
   TImage *Image1;
   vector<HGanttInfo> GanttVec;
   map<UTF8String, HJobListInfo> JobMap;
   set<UTF8String> CriticalSet;
   const static int RulerTop = 30;
   const static int RulerLeft = 30;
   void __fastcall Image1Click(TObject *Sender);
   void __fastcall Image1DblClick(TObject *Sender);
   void __fastcall Image1MouseDown(TObject* Sender, TMouseButton Button,
      TShiftState Shift, int X, int Y);
   void __fastcall Image1MouseMove(TObject *Sender, TShiftState Shift,
      int X, int Y);

   int LastX;
   int LastY;
public:		// User declarations
   __fastcall TGanttForm(TComponent* Owner);
   void __fastcall Init();
   void __fastcall ShowIt();
   void __fastcall Clear();
   void __fastcall ButtonDrawGanttChartClick_aux(TDateTime &RulerStartTime, int &Scale);
};
//---------------------------------------------------------------------------
extern PACKAGE TGanttForm *GanttForm;
//---------------------------------------------------------------------------
#endif
